{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 20春_Web数据挖掘\n",
    "# 项目1 by 廖汉腾, 许智超\n",
    "胡润研究院发布《2019胡润全球独角兽榜》\n",
    "- 中 https://www.hurun.net/CN/Article/Details?num=E7190250C866\n",
    "- 英 https://www.hurun.net/EN/Article/Details?num=A38B8285034B\n",
    "- 单一网页含表格，可以试试[pandas.read_html()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_html.html)取出数据\n",
    "- 原理 [pandas.read_html()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_html.html)的API文档说用了lxml 模块\n",
    "- 使用pandas 输出成tsv及excel档"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "URL_src = { \"zh\" : \"https://www.hurun.net/CN/Article/Details?num=E7190250C866\", \n",
    "            \"en\" : \"https://www.hurun.net/EN/Article/Details?num=A38B8285034B\",}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "df_list = pd.read_html(URL_src['zh'], encoding=\"utf8\", header=0, index_col=0)\n",
    "# 真幸運有好幾個表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "11\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>全球独角兽总部.1</th>\n",
       "      <th>全球独角兽总部.2</th>\n",
       "      <th>全球独角兽总部.3</th>\n",
       "      <th>全球独角兽总部.4</th>\n",
       "      <th>全球独角兽总部.5</th>\n",
       "      <th>全球独角兽总部.6</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>全球独角兽总部</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>国家</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>城市</td>\n",
       "      <td>独角兽数量</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>中国</td>\n",
       "      <td>206</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>北京</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>美国</td>\n",
       "      <td>203</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>印度</td>\n",
       "      <td>21</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>上海</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>英国</td>\n",
       "      <td>13</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "      <td>纽约</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        全球独角兽总部.1 全球独角兽总部.2  全球独角兽总部.3  全球独角兽总部.4 全球独角兽总部.5 全球独角兽总部.6\n",
       "全球独角兽总部                                                              \n",
       "NaN            国家     独角兽数量        NaN        NaN        城市     独角兽数量\n",
       "1.0            中国       206        NaN        1.0        北京        82\n",
       "2.0            美国       203        NaN        2.0       旧金山        55\n",
       "3.0            印度        21        NaN        3.0        上海        47\n",
       "4.0            英国        13        NaN        4.0        纽约        25"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量占全球比重</th>\n",
       "      <th>GDP占全球比重</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>中国</td>\n",
       "      <td>42%</td>\n",
       "      <td>16%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>美国</td>\n",
       "      <td>41%</td>\n",
       "      <td>24%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>印度</td>\n",
       "      <td>4.3%</td>\n",
       "      <td>3.2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>英国</td>\n",
       "      <td>2.6%</td>\n",
       "      <td>3.3%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.0</th>\n",
       "      <td>德国</td>\n",
       "      <td>1.4%</td>\n",
       "      <td>4.7%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     国家 独角兽数量占全球比重 GDP占全球比重\n",
       "1.0  中国        42%      16%\n",
       "2.0  美国        41%      24%\n",
       "3.0  印度       4.3%     3.2%\n",
       "4.0  英国       2.6%     3.3%\n",
       "5.0  德国       1.4%     4.7%"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>占总市值比例</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>68</td>\n",
       "      <td>9%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>56</td>\n",
       "      <td>22%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>云计算</td>\n",
       "      <td>44</td>\n",
       "      <td>7%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>40</td>\n",
       "      <td>5%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>物流</td>\n",
       "      <td>34</td>\n",
       "      <td>6%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     行业  独角兽数量 占总市值比例\n",
       "1  电子商务     68     9%\n",
       "2  金融科技     56    22%\n",
       "3   云计算     44     7%\n",
       "4  人工智能     40     5%\n",
       "5    物流     34     6%"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.1</th>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.2</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>投资机构</td>\n",
       "      <td>独角兽数量</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>红杉资本</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>腾讯</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>软银</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>老虎基金</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                             《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.1  \\\n",
       "《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名                                  \n",
       "NaN                                                    投资机构   \n",
       "1.0                                                    红杉资本   \n",
       "2.0                                                      腾讯   \n",
       "3.0                                                      软银   \n",
       "4.0                                                    老虎基金   \n",
       "\n",
       "                             《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.2  \n",
       "《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名                                 \n",
       "NaN                                                   独角兽数量  \n",
       "1.0                                                      92  \n",
       "2.0                                                      46  \n",
       "3.0                                                      42  \n",
       "4.0                                                      36  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>从大公司分拆出来的独角兽.1</th>\n",
       "      <th>从大公司分拆出来的独角兽.2</th>\n",
       "      <th>从大公司分拆出来的独角兽.3</th>\n",
       "      <th>从大公司分拆出来的独角兽.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>从大公司分拆出来的独角兽</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>独角兽企业</th>\n",
       "      <td>分拆自</td>\n",
       "      <td>国家</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "      <td>行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>蚂蚁金服</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>10000</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>淘票票</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>电子商务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>阿里体育</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陆金所</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>2700</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             从大公司分拆出来的独角兽.1 从大公司分拆出来的独角兽.2 从大公司分拆出来的独角兽.3 从大公司分拆出来的独角兽.4\n",
       "从大公司分拆出来的独角兽                                                            \n",
       "独角兽企业                   分拆自             国家       估值（亿人民币）             行业\n",
       "蚂蚁金服                   阿里巴巴             中国          10000           金融科技\n",
       "淘票票                    阿里巴巴             中国            150           电子商务\n",
       "阿里体育                   阿里巴巴             中国             70          媒体和娱乐\n",
       "陆金所                    中国平安             中国           2700           金融科技"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.1</th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.2</th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.3</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>《2019胡润全球独角兽榜》前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>企业名称</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "      <td>总部</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "      <td>杭州</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>5000</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  《2019胡润全球独角兽榜》前十名.1 《2019胡润全球独角兽榜》前十名.2 《2019胡润全球独角兽榜》前十名.3\n",
       "《2019胡润全球独角兽榜》前十名                                                            \n",
       "NaN                              企业名称            估值（亿人民币）                  总部\n",
       "1.0                              蚂蚁金服               10000                  杭州\n",
       "2.0                              字节跳动                5000                  北京\n",
       "3.0                              滴滴出行                3600                  北京\n",
       "4.0                             Infor                3500                  纽约"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>美国独角兽数量最多的行业.1</th>\n",
       "      <th>美国独角兽数量最多的行业.2</th>\n",
       "      <th>美国独角兽数量最多的行业.3</th>\n",
       "      <th>美国独角兽数量最多的行业.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>美国独角兽数量最多的行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>行业</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>总估值（十亿美元）</td>\n",
       "      <td>成为独角兽平均所花时间（年）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>云计算</td>\n",
       "      <td>32</td>\n",
       "      <td>97</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>21</td>\n",
       "      <td>71</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>20</td>\n",
       "      <td>43</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>17</td>\n",
       "      <td>37</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             美国独角兽数量最多的行业.1 美国独角兽数量最多的行业.2 美国独角兽数量最多的行业.3  美国独角兽数量最多的行业.4\n",
       "美国独角兽数量最多的行业                                                             \n",
       "NaN                      行业          独角兽数量      总估值（十亿美元）  成为独角兽平均所花时间（年）\n",
       "1.0                     云计算             32             97               8\n",
       "2.0                    金融科技             21             71               6\n",
       "3.0                    人工智能             20             43               7\n",
       "4.0                    电子商务             17             37               6"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>中国独角兽数量最多的行业.1</th>\n",
       "      <th>中国独角兽数量最多的行业.2</th>\n",
       "      <th>中国独角兽数量最多的行业.3</th>\n",
       "      <th>中国独角兽数量最多的行业.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>中国独角兽数量最多的行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>行业</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>总估值（十亿美元）</td>\n",
       "      <td>成为独角兽平均所花时间（年）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>33</td>\n",
       "      <td>62</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>22</td>\n",
       "      <td>262</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>物流</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             中国独角兽数量最多的行业.1 中国独角兽数量最多的行业.2 中国独角兽数量最多的行业.3  中国独角兽数量最多的行业.4\n",
       "中国独角兽数量最多的行业                                                             \n",
       "NaN                      行业          独角兽数量      总估值（十亿美元）  成为独角兽平均所花时间（年）\n",
       "1.0                    电子商务             33             62               5\n",
       "2.0                    金融科技             22            262               5\n",
       "3.0                   媒体和娱乐             17            123               6\n",
       "4.0                      物流             16             57               6"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>最快的独角兽.1</th>\n",
       "      <th>最快的独角兽.2</th>\n",
       "      <th>最快的独角兽.3</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>最快的独角兽</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>成为独角兽所花时间（年）</th>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>估值最高的独角兽</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>&lt;1</th>\n",
       "      <td>5</td>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>24</td>\n",
       "      <td>贝壳找房</td>\n",
       "      <td>600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>36</td>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>64</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             最快的独角兽.1   最快的独角兽.2  最快的独角兽.3\n",
       "最快的独角兽                                    \n",
       "成为独角兽所花时间（年）    独角兽数量   估值最高的独角兽  估值（亿人民币）\n",
       "<1                  5       蚂蚁金服     10000\n",
       "1                  24       贝壳找房       600\n",
       "2                  36       滴滴出行      3600\n",
       "3                  64  JUUL Labs      3400"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>投资机构</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Sequoia（红杉资本）</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Tencent（腾讯）</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>SoftBank（软银）</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Tiger Fund（老虎基金）</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>IDG</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               投资机构 独角兽数量\n",
       "1     Sequoia（红杉资本）    92\n",
       "2       Tencent（腾讯）    46\n",
       "3      SoftBank（软银）    42\n",
       "4  Tiger Fund（老虎基金）    36\n",
       "5               IDG    31"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>企业名称</th>\n",
       "      <th>Company Name</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>国家</th>\n",
       "      <th>城市</th>\n",
       "      <th>行业</th>\n",
       "      <th>掌门人/创始人</th>\n",
       "      <th>成立年份</th>\n",
       "      <th>部分投资机构</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>Ant Financial</td>\n",
       "      <td>10000</td>\n",
       "      <td>中国</td>\n",
       "      <td>杭州</td>\n",
       "      <td>金融科技</td>\n",
       "      <td>井贤栋</td>\n",
       "      <td>2014</td>\n",
       "      <td>春华资本、中投海外、红杉资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>Bytedance</td>\n",
       "      <td>5000</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>张一鸣</td>\n",
       "      <td>2012</td>\n",
       "      <td>红杉资本、海纳亚洲、纪源资本、启明创投</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>Didi Chuxing</td>\n",
       "      <td>3600</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>共享经济</td>\n",
       "      <td>程维</td>\n",
       "      <td>2012</td>\n",
       "      <td>腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infor</td>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>美国</td>\n",
       "      <td>纽约</td>\n",
       "      <td>云计算</td>\n",
       "      <td>Jim Schaper</td>\n",
       "      <td>2002</td>\n",
       "      <td>Golden Gate Capital, Koch Equity Development</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "      <td>美国</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>消费品</td>\n",
       "      <td>Adam Bowen, James Monsees, Kevin Burns, Tim Da...</td>\n",
       "      <td>2015</td>\n",
       "      <td>M13, Timothy Davis, Evolution VC Partners, Tig...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         企业名称   Company Name  估值（亿人民币）  国家   城市     行业  \\\n",
       "排名                                                       \n",
       "1        蚂蚁金服  Ant Financial     10000  中国   杭州   金融科技   \n",
       "2        字节跳动      Bytedance      5000  中国   北京  媒体和娱乐   \n",
       "3        滴滴出行   Didi Chuxing      3600  中国   北京   共享经济   \n",
       "4       Infor          Infor      3500  美国   纽约    云计算   \n",
       "5   JUUL Labs      JUUL Labs      3400  美国  旧金山    消费品   \n",
       "\n",
       "                                              掌门人/创始人  成立年份  \\\n",
       "排名                                                            \n",
       "1                                                 井贤栋  2014   \n",
       "2                                                 张一鸣  2012   \n",
       "3                                                  程维  2012   \n",
       "4                                         Jim Schaper  2002   \n",
       "5   Adam Bowen, James Monsees, Kevin Burns, Tim Da...  2015   \n",
       "\n",
       "                                               部分投资机构  \n",
       "排名                                                     \n",
       "1                                      春华资本、中投海外、红杉资本  \n",
       "2                                 红杉资本、海纳亚洲、纪源资本、启明创投  \n",
       "3                              腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本  \n",
       "4        Golden Gate Capital, Koch Equity Development  \n",
       "5   M13, Timothy Davis, Evolution VC Partners, Tig...  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "# 快速檢查，看共有幾個表\n",
    "print (len(df_list))\n",
    "\n",
    "for df in df_list:\n",
    "    display(df.head())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_out = dict()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>全球独角兽总部</th>\n",
       "      <th>全球独角兽总部.1</th>\n",
       "      <th>全球独角兽总部.2</th>\n",
       "      <th>全球独角兽总部.3</th>\n",
       "      <th>全球独角兽总部.4</th>\n",
       "      <th>全球独角兽总部.5</th>\n",
       "      <th>全球独角兽总部.6</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>国家</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>城市</td>\n",
       "      <td>独角兽数量</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>中国</td>\n",
       "      <td>206</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>北京</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>美国</td>\n",
       "      <td>203</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>印度</td>\n",
       "      <td>21</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>上海</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>英国</td>\n",
       "      <td>13</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "      <td>纽约</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   全球独角兽总部 全球独角兽总部.1 全球独角兽总部.2  全球独角兽总部.3  全球独角兽总部.4 全球独角兽总部.5 全球独角兽总部.6\n",
       "0      NaN        国家     独角兽数量        NaN        NaN        城市     独角兽数量\n",
       "1      1.0        中国       206        NaN        1.0        北京        82\n",
       "2      2.0        美国       203        NaN        2.0       旧金山        55\n",
       "3      3.0        印度        21        NaN        3.0        上海        47\n",
       "4      4.0        英国        13        NaN        4.0        纽约        25"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 0\n",
    "d = df_list[i].copy().reset_index()\n",
    "d.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NaN</th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>NaN</th>\n",
       "      <th>NaN</th>\n",
       "      <th>城市</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>中国</td>\n",
       "      <td>206</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>北京</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>美国</td>\n",
       "      <td>203</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>印度</td>\n",
       "      <td>21</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>上海</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>英国</td>\n",
       "      <td>13</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "      <td>纽约</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5.0</td>\n",
       "      <td>德国</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.0</td>\n",
       "      <td>杭州</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "0  NaN  国家 独角兽数量  NaN  NaN   城市 独角兽数量\n",
       "1  1.0  中国   206  NaN  1.0   北京    82\n",
       "2  2.0  美国   203  NaN  2.0  旧金山    55\n",
       "3  3.0  印度    21  NaN  3.0   上海    47\n",
       "4  4.0  英国    13  NaN  4.0   纽约    25\n",
       "5  5.0  德国     7  NaN  5.0   杭州    19"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 实际上为两个表格串起来：全球独角兽总部_国家, 全球独角兽总部_城市\n",
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index([nan, '国家', '独角兽数量', nan, nan, '城市', '独角兽数量'], dtype='object', name=0)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['0', '国家', '独角兽数量', '3', '4', '城市', '独角兽数量']"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "[str(i) if x!=x else x for i,x in enumerate(d.columns)]  #The usual way to test for a NaN is to see if it's equal to itself"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['0', '国家', '独角兽数量', '3', '4', '城市', '独角兽数量'], dtype='object')"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = [str(i) if x!=x else x for i,x in enumerate(d.columns)]    #空缺值填0,1,2\n",
    "d.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "d = d.fillna(0)\n",
    "d[[\"0\"]] = d[[\"0\"]].astype(int)\n",
    "d[[\"4\"]] = d[[\"4\"]].astype(int)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_国家</th>\n",
       "      <th>0</th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>中国</td>\n",
       "      <td>206</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>美国</td>\n",
       "      <td>203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>印度</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>英国</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>德国</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5</td>\n",
       "      <td>以色列</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>韩国</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>印尼</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8</td>\n",
       "      <td>法国</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>8</td>\n",
       "      <td>巴西</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>12</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>12</td>\n",
       "      <td>日本</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>12</td>\n",
       "      <td>新加坡</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>15</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>15</td>\n",
       "      <td>澳大利亚</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>15</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>15</td>\n",
       "      <td>爱尔兰</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>15</td>\n",
       "      <td>芬兰</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>15</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>15</td>\n",
       "      <td>马耳他</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>15</td>\n",
       "      <td>菲律宾</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>15</td>\n",
       "      <td>爱沙尼亚</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>15</td>\n",
       "      <td>卢森堡</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_国家   0    国家 独角兽数量\n",
       "1         1    中国   206\n",
       "2         2    美国   203\n",
       "3         3    印度    21\n",
       "4         4    英国    13\n",
       "5         5    德国     7\n",
       "6         5   以色列     7\n",
       "7         7    韩国     6\n",
       "8         8    印尼     4\n",
       "9         8    法国     4\n",
       "10        8    巴西     4\n",
       "11       11    瑞士     3\n",
       "12       12    瑞典     2\n",
       "13       12    日本     2\n",
       "14       12   新加坡     2\n",
       "15       15   西班牙     1\n",
       "16       15  澳大利亚     1\n",
       "17       15  哥伦比亚     1\n",
       "18       15   爱尔兰     1\n",
       "19       15    芬兰     1\n",
       "20       15   阿根廷     1\n",
       "21       15   马耳他     1\n",
       "22       15   菲律宾     1\n",
       "23       15  爱沙尼亚     1\n",
       "24       15   卢森堡     1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_城市</th>\n",
       "      <th>4</th>\n",
       "      <th>城市</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>北京</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>上海</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>纽约</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>杭州</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>深圳</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>南京</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>帕洛阿尔托</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9</td>\n",
       "      <td>班加罗尔</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9</td>\n",
       "      <td>雷德伍德城</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>9</td>\n",
       "      <td>伦敦</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>12</td>\n",
       "      <td>广州</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>12</td>\n",
       "      <td>波士顿</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>14</td>\n",
       "      <td>古尔冈</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>15</td>\n",
       "      <td>山景城</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>16</td>\n",
       "      <td>森尼维耳市</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>16</td>\n",
       "      <td>首尔</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>18</td>\n",
       "      <td>圣保罗</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>18</td>\n",
       "      <td>雅加达</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>18</td>\n",
       "      <td>圣地亚哥</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>18</td>\n",
       "      <td>亚特兰大</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>18</td>\n",
       "      <td>圣塔莫尼卡</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>18</td>\n",
       "      <td>巴黎</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>18</td>\n",
       "      <td>柏林</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>18</td>\n",
       "      <td>成都</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>18</td>\n",
       "      <td>香港</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>18</td>\n",
       "      <td>芝加哥</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_城市   4     城市 独角兽数量\n",
       "1         1     北京    82\n",
       "2         2    旧金山    55\n",
       "3         3     上海    47\n",
       "4         4     纽约    25\n",
       "5         5     杭州    19\n",
       "6         6     深圳    18\n",
       "7         7     南京    12\n",
       "8         8  帕洛阿尔托    10\n",
       "9         9   班加罗尔     9\n",
       "10        9  雷德伍德城     9\n",
       "11        9     伦敦     9\n",
       "12       12     广州     8\n",
       "13       12    波士顿     8\n",
       "14       14    古尔冈     7\n",
       "15       15    山景城     6\n",
       "16       16  森尼维耳市     5\n",
       "17       16     首尔     5\n",
       "18       18    圣保罗     4\n",
       "19       18    雅加达     4\n",
       "20       18   圣地亚哥     4\n",
       "21       18   亚特兰大     4\n",
       "22       18  圣塔莫尼卡     4\n",
       "23       18     巴黎     4\n",
       "24       18     柏林     4\n",
       "25       18     成都     4\n",
       "26       18     香港     4\n",
       "27       18    芝加哥     4"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽数_国家\"\n",
    "d.columns.name = df_label\n",
    "df_out[df_label] = d.iloc[:,[0,1,2]].query(\"国家!=0\")\n",
    "display(df_out[df_label] )\n",
    "\n",
    "df_label = \"独角兽数_城市\"\n",
    "d.columns.name = df_label\n",
    "df_out[df_label] = d.iloc[:,[4,5,6]].query(\"城市!=0\")\n",
    "display(df_out[df_label] )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量占全球比重</th>\n",
       "      <th>GDP占全球比重</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>中国</td>\n",
       "      <td>42%</td>\n",
       "      <td>16%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>美国</td>\n",
       "      <td>41%</td>\n",
       "      <td>24%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>印度</td>\n",
       "      <td>4.3%</td>\n",
       "      <td>3.2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>英国</td>\n",
       "      <td>2.6%</td>\n",
       "      <td>3.3%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.0</th>\n",
       "      <td>德国</td>\n",
       "      <td>1.4%</td>\n",
       "      <td>4.7%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     国家 独角兽数量占全球比重 GDP占全球比重\n",
       "1.0  中国        42%      16%\n",
       "2.0  美国        41%      24%\n",
       "3.0  印度       4.3%     3.2%\n",
       "4.0  英国       2.6%     3.3%\n",
       "5.0  德国       1.4%     4.7%"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 1\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "# 国家占比: 占全球比重"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "d.columns = [ x.replace(\"占全球比重\",\"占比\") for x in d.columns ]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量占比</th>\n",
       "      <th>GDP占比</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>中国</td>\n",
       "      <td>42%</td>\n",
       "      <td>16%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>美国</td>\n",
       "      <td>41%</td>\n",
       "      <td>24%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>印度</td>\n",
       "      <td>4.3%</td>\n",
       "      <td>3.2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>英国</td>\n",
       "      <td>2.6%</td>\n",
       "      <td>3.3%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.0</th>\n",
       "      <td>德国</td>\n",
       "      <td>1.4%</td>\n",
       "      <td>4.7%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     国家 独角兽数量占比 GDP占比\n",
       "1.0  中国     42%   16%\n",
       "2.0  美国     41%   24%\n",
       "3.0  印度    4.3%  3.2%\n",
       "4.0  英国    2.6%  3.3%\n",
       "5.0  德国    1.4%  4.7%"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "d.独角兽数量占比 = d.独角兽数量占比.apply( lambda x: float(x.replace(\"%\",\"\")) )\n",
    "d.GDP占比 = d.GDP占比.apply( lambda x: float(x.replace(\"%\",\"\")) )\n",
    "d.index = d.index.fillna(0).astype(int)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_占比_国家</th>\n",
       "      <th>国家</th>\n",
       "      <th>独角兽数量占比</th>\n",
       "      <th>GDP占比</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中国</td>\n",
       "      <td>42.0</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>美国</td>\n",
       "      <td>41.0</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>印度</td>\n",
       "      <td>4.3</td>\n",
       "      <td>3.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>英国</td>\n",
       "      <td>2.6</td>\n",
       "      <td>3.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>德国</td>\n",
       "      <td>1.4</td>\n",
       "      <td>4.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>以色列</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>全球其他国家</td>\n",
       "      <td>7.0</td>\n",
       "      <td>48.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_占比_国家      国家  独角兽数量占比  GDP占比\n",
       "1               中国     42.0   16.0\n",
       "2               美国     41.0   24.0\n",
       "3               印度      4.3    3.2\n",
       "4               英国      2.6    3.3\n",
       "5               德国      1.4    4.7\n",
       "5              以色列      1.4    0.4\n",
       "0           全球其他国家      7.0   48.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽数_占比_国家\"\n",
    "d.columns.name = df_label\n",
    "display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>占总市值比例</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>68</td>\n",
       "      <td>9%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>56</td>\n",
       "      <td>22%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>云计算</td>\n",
       "      <td>44</td>\n",
       "      <td>7%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>40</td>\n",
       "      <td>5%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>物流</td>\n",
       "      <td>34</td>\n",
       "      <td>6%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     行业  独角兽数量 占总市值比例\n",
       "1  电子商务     68     9%\n",
       "2  金融科技     56    22%\n",
       "3   云计算     44     7%\n",
       "4  人工智能     40     5%\n",
       "5    物流     34     6%"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 2\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "# 行业占比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_占比_行业</th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>占总市值比例</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>68</td>\n",
       "      <td>9%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>56</td>\n",
       "      <td>22%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>云计算</td>\n",
       "      <td>44</td>\n",
       "      <td>7%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>40</td>\n",
       "      <td>5%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>物流</td>\n",
       "      <td>34</td>\n",
       "      <td>6%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>健康科技</td>\n",
       "      <td>27</td>\n",
       "      <td>3%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>24</td>\n",
       "      <td>8%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>共享经济</td>\n",
       "      <td>22</td>\n",
       "      <td>11%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>软件与服务</td>\n",
       "      <td>21</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>生命科学</td>\n",
       "      <td>18</td>\n",
       "      <td>3%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>大数据</td>\n",
       "      <td>18</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>新能源汽车</td>\n",
       "      <td>15</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>教育科技</td>\n",
       "      <td>15</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>房地产科技</td>\n",
       "      <td>13</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>消费品</td>\n",
       "      <td>12</td>\n",
       "      <td>4%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>新零售</td>\n",
       "      <td>11</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>区块链</td>\n",
       "      <td>11</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>新能源</td>\n",
       "      <td>10</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>游戏</td>\n",
       "      <td>9</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>网络安全</td>\n",
       "      <td>7</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>即时通讯</td>\n",
       "      <td>6</td>\n",
       "      <td>&lt;1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>机器人</td>\n",
       "      <td>4</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>虚拟与增强现实</td>\n",
       "      <td>3</td>\n",
       "      <td>1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>3D印刷</td>\n",
       "      <td>3</td>\n",
       "      <td>&lt;1%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>航天</td>\n",
       "      <td>3</td>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_占比_行业       行业  独角兽数量 占总市值比例\n",
       "1              电子商务     68     9%\n",
       "2              金融科技     56    22%\n",
       "3               云计算     44     7%\n",
       "4              人工智能     40     5%\n",
       "5                物流     34     6%\n",
       "6              健康科技     27     3%\n",
       "7             媒体和娱乐     24     8%\n",
       "8              共享经济     22    11%\n",
       "9             软件与服务     21     2%\n",
       "10             生命科学     18     3%\n",
       "10              大数据     18     2%\n",
       "12            新能源汽车     15     2%\n",
       "12             教育科技     15     2%\n",
       "14            房地产科技     13     2%\n",
       "15              消费品     12     4%\n",
       "16              新零售     11     1%\n",
       "16              区块链     11     2%\n",
       "18              新能源     10     1%\n",
       "19               游戏      9     1%\n",
       "20             网络安全      7     1%\n",
       "21             即时通讯      6    <1%\n",
       "22              机器人      4     1%\n",
       "23          虚拟与增强现实      3     1%\n",
       "23             3D印刷      3    <1%\n",
       "23               航天      3     2%"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽数_占比_行业\"\n",
    "d.columns.name = df_label\n",
    "display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.1</th>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.2</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>投资机构</td>\n",
       "      <td>独角兽数量</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>红杉资本</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>腾讯</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>软银</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>老虎基金</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                             《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.1  \\\n",
       "《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名                                  \n",
       "NaN                                                    投资机构   \n",
       "1.0                                                    红杉资本   \n",
       "2.0                                                      腾讯   \n",
       "3.0                                                      软银   \n",
       "4.0                                                    老虎基金   \n",
       "\n",
       "                             《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名.2  \n",
       "《2019胡润全球独角兽活跃投资机构百强榜》 - 前十名                                 \n",
       "NaN                                                   独角兽数量  \n",
       "1.0                                                      92  \n",
       "2.0                                                      46  \n",
       "3.0                                                      42  \n",
       "4.0                                                      36  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 3\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "# 投资机构_前十名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['投资机构', '独角兽数量'], dtype='object', name=nan)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"ranking\" \n",
    "# 2019胡润全球独角兽活跃投资机构百强榜\n",
    "d.index = d.index.astype(\"int\")\n",
    "d.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_投资机构_前十名</th>\n",
       "      <th>投资机构</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ranking</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>红杉资本</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>腾讯</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>软银</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>老虎基金</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>IDG</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>高盛</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>安德森•霍洛维茨基金</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>DST</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>纪源资本</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>启明创投</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_投资机构_前十名        投资机构 独角兽数量\n",
       "ranking                        \n",
       "1                    红杉资本    92\n",
       "2                      腾讯    46\n",
       "3                      软银    42\n",
       "4                    老虎基金    36\n",
       "5                     IDG    31\n",
       "6                      高盛    24\n",
       "7                    阿里巴巴    22\n",
       "8              安德森•霍洛维茨基金    20\n",
       "8                     DST    20\n",
       "10                   纪源资本    19\n",
       "10                   启明创投    19"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽数_投资机构_前十名\"\n",
    "d.columns.name = df_label\n",
    "display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>从大公司分拆出来的独角兽.1</th>\n",
       "      <th>从大公司分拆出来的独角兽.2</th>\n",
       "      <th>从大公司分拆出来的独角兽.3</th>\n",
       "      <th>从大公司分拆出来的独角兽.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>从大公司分拆出来的独角兽</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>独角兽企业</th>\n",
       "      <td>分拆自</td>\n",
       "      <td>国家</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "      <td>行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>蚂蚁金服</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>10000</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>淘票票</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>电子商务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>阿里体育</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陆金所</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>2700</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             从大公司分拆出来的独角兽.1 从大公司分拆出来的独角兽.2 从大公司分拆出来的独角兽.3 从大公司分拆出来的独角兽.4\n",
       "从大公司分拆出来的独角兽                                                            \n",
       "独角兽企业                   分拆自             国家       估值（亿人民币）             行业\n",
       "蚂蚁金服                   阿里巴巴             中国          10000           金融科技\n",
       "淘票票                    阿里巴巴             中国            150           电子商务\n",
       "阿里体育                   阿里巴巴             中国             70          媒体和娱乐\n",
       "陆金所                    中国平安             中国           2700           金融科技"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 4\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  从大公司分拆出来的独角兽"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽企业</th>\n",
       "      <th>分拆自</th>\n",
       "      <th>国家</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>行业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>独角兽企业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>蚂蚁金服</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>10000</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>淘票票</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>电子商务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>阿里体育</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陆金所</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>2700</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>平安医保科技</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>600</td>\n",
       "      <td>健康科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融壹账通</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>500</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东数科</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>1300</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东物流</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>800</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东健康</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>健康科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>苏宁金服</th>\n",
       "      <td>苏宁</td>\n",
       "      <td>中国</td>\n",
       "      <td>500</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>苏宁体育</th>\n",
       "      <td>苏宁</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>网易云音乐</th>\n",
       "      <td>网易</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>网易有道</th>\n",
       "      <td>网易</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>软件与服务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>贝壳找房</th>\n",
       "      <td>链家</td>\n",
       "      <td>中国</td>\n",
       "      <td>600</td>\n",
       "      <td>房地产科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Uber ATG</th>\n",
       "      <td>Uber</td>\n",
       "      <td>美国</td>\n",
       "      <td>500</td>\n",
       "      <td>共享经济</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>度小满金融</th>\n",
       "      <td>百度</td>\n",
       "      <td>中国</td>\n",
       "      <td>200</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>微鲸</th>\n",
       "      <td>华人文化</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>消费品</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>蜀海</th>\n",
       "      <td>海底捞</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>日日顺</th>\n",
       "      <td>海尔</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金山云</th>\n",
       "      <td>金山</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>云计算</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58到家</th>\n",
       "      <td>58同城</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>软件与服务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Nikola Motor Company</th>\n",
       "      <td>Nikola</td>\n",
       "      <td>美国</td>\n",
       "      <td>70</td>\n",
       "      <td>新能源汽车</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽企业                    分拆自  国家 估值（亿人民币）     行业\n",
       "独角兽企业                                           \n",
       "蚂蚁金服                    阿里巴巴  中国    10000   金融科技\n",
       "淘票票                     阿里巴巴  中国      150   电子商务\n",
       "阿里体育                    阿里巴巴  中国       70  媒体和娱乐\n",
       "陆金所                     中国平安  中国     2700   金融科技\n",
       "平安医保科技                  中国平安  中国      600   健康科技\n",
       "金融壹账通                   中国平安  中国      500   金融科技\n",
       "京东数科                      京东  中国     1300   金融科技\n",
       "京东物流                      京东  中国      800     物流\n",
       "京东健康                      京东  中国      100   健康科技\n",
       "苏宁金服                      苏宁  中国      500   金融科技\n",
       "苏宁体育                      苏宁  中国      150  媒体和娱乐\n",
       "网易云音乐                     网易  中国      100  媒体和娱乐\n",
       "网易有道                      网易  中国       70  软件与服务\n",
       "贝壳找房                      链家  中国      600  房地产科技\n",
       "Uber ATG                Uber  美国      500   共享经济\n",
       "度小满金融                     百度  中国      200   金融科技\n",
       "微鲸                      华人文化  中国      100    消费品\n",
       "蜀海                       海底捞  中国      100     物流\n",
       "日日顺                       海尔  中国      100     物流\n",
       "金山云                       金山  中国      100    云计算\n",
       "58到家                    58同城  中国       70  软件与服务\n",
       "Nikola Motor Company  Nikola  美国       70  新能源汽车"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"独角兽企业\" \n",
    "# 2019胡润全球独角兽活跃投资机构百强榜\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽企业_从大公司分拆出来</th>\n",
       "      <th>分拆自</th>\n",
       "      <th>国家</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>行业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>独角兽企业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>蚂蚁金服</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>10000</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>淘票票</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>电子商务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>阿里体育</th>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陆金所</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>2700</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>平安医保科技</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>600</td>\n",
       "      <td>健康科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融壹账通</th>\n",
       "      <td>中国平安</td>\n",
       "      <td>中国</td>\n",
       "      <td>500</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东数科</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>1300</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东物流</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>800</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>京东健康</th>\n",
       "      <td>京东</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>健康科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>苏宁金服</th>\n",
       "      <td>苏宁</td>\n",
       "      <td>中国</td>\n",
       "      <td>500</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>苏宁体育</th>\n",
       "      <td>苏宁</td>\n",
       "      <td>中国</td>\n",
       "      <td>150</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>网易云音乐</th>\n",
       "      <td>网易</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>网易有道</th>\n",
       "      <td>网易</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>软件与服务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>贝壳找房</th>\n",
       "      <td>链家</td>\n",
       "      <td>中国</td>\n",
       "      <td>600</td>\n",
       "      <td>房地产科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Uber ATG</th>\n",
       "      <td>Uber</td>\n",
       "      <td>美国</td>\n",
       "      <td>500</td>\n",
       "      <td>共享经济</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>度小满金融</th>\n",
       "      <td>百度</td>\n",
       "      <td>中国</td>\n",
       "      <td>200</td>\n",
       "      <td>金融科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>微鲸</th>\n",
       "      <td>华人文化</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>消费品</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>蜀海</th>\n",
       "      <td>海底捞</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>日日顺</th>\n",
       "      <td>海尔</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金山云</th>\n",
       "      <td>金山</td>\n",
       "      <td>中国</td>\n",
       "      <td>100</td>\n",
       "      <td>云计算</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58到家</th>\n",
       "      <td>58同城</td>\n",
       "      <td>中国</td>\n",
       "      <td>70</td>\n",
       "      <td>软件与服务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Nikola Motor Company</th>\n",
       "      <td>Nikola</td>\n",
       "      <td>美国</td>\n",
       "      <td>70</td>\n",
       "      <td>新能源汽车</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽企业_从大公司分拆出来           分拆自  国家 估值（亿人民币）     行业\n",
       "独角兽企业                                           \n",
       "蚂蚁金服                    阿里巴巴  中国    10000   金融科技\n",
       "淘票票                     阿里巴巴  中国      150   电子商务\n",
       "阿里体育                    阿里巴巴  中国       70  媒体和娱乐\n",
       "陆金所                     中国平安  中国     2700   金融科技\n",
       "平安医保科技                  中国平安  中国      600   健康科技\n",
       "金融壹账通                   中国平安  中国      500   金融科技\n",
       "京东数科                      京东  中国     1300   金融科技\n",
       "京东物流                      京东  中国      800     物流\n",
       "京东健康                      京东  中国      100   健康科技\n",
       "苏宁金服                      苏宁  中国      500   金融科技\n",
       "苏宁体育                      苏宁  中国      150  媒体和娱乐\n",
       "网易云音乐                     网易  中国      100  媒体和娱乐\n",
       "网易有道                      网易  中国       70  软件与服务\n",
       "贝壳找房                      链家  中国      600  房地产科技\n",
       "Uber ATG                Uber  美国      500   共享经济\n",
       "度小满金融                     百度  中国      200   金融科技\n",
       "微鲸                      华人文化  中国      100    消费品\n",
       "蜀海                       海底捞  中国      100     物流\n",
       "日日顺                       海尔  中国      100     物流\n",
       "金山云                       金山  中国      100    云计算\n",
       "58到家                    58同城  中国       70  软件与服务\n",
       "Nikola Motor Company  Nikola  美国       70  新能源汽车"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽企业_从大公司分拆出来\"\n",
    "d.columns.name = df_label\n",
    "display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.1</th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.2</th>\n",
       "      <th>《2019胡润全球独角兽榜》前十名.3</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>《2019胡润全球独角兽榜》前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>企业名称</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "      <td>总部</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "      <td>杭州</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>5000</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  《2019胡润全球独角兽榜》前十名.1 《2019胡润全球独角兽榜》前十名.2 《2019胡润全球独角兽榜》前十名.3\n",
       "《2019胡润全球独角兽榜》前十名                                                            \n",
       "NaN                              企业名称            估值（亿人民币）                  总部\n",
       "1.0                              蚂蚁金服               10000                  杭州\n",
       "2.0                              字节跳动                5000                  北京\n",
       "3.0                              滴滴出行                3600                  北京\n",
       "4.0                             Infor                3500                  纽约"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 5\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽企业_估值前十名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽企业_估值</th>\n",
       "      <th>企业名称</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>总部</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "      <td>杭州</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>5000</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>陆金所</td>\n",
       "      <td>2700</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>爱彼迎</td>\n",
       "      <td>2700</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>SpaceX</td>\n",
       "      <td>2500</td>\n",
       "      <td>洛杉矶</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>WeWork</td>\n",
       "      <td>2100</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Stripe</td>\n",
       "      <td>1600</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽企业_估值       企业名称 估值（亿人民币）   总部\n",
       "前十名                              \n",
       "1              蚂蚁金服    10000   杭州\n",
       "2              字节跳动     5000   北京\n",
       "3              滴滴出行     3600   北京\n",
       "4             Infor     3500   纽约\n",
       "5         JUUL Labs     3400  旧金山\n",
       "6               陆金所     2700   上海\n",
       "6               爱彼迎     2700  旧金山\n",
       "8            SpaceX     2500  洛杉矶\n",
       "9            WeWork     2100   纽约\n",
       "10           Stripe     1600  旧金山"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"前十名\" \n",
    "d.index = d.index.astype(int)\n",
    "d.columns.name = \"独角兽企业_估值\" \n",
    "# 2019胡润全球独角兽活跃投资机构百强榜\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽企业_估值前十名</th>\n",
       "      <th>企业名称</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>总部</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>前十名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "      <td>杭州</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>5000</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "      <td>北京</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>陆金所</td>\n",
       "      <td>2700</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>爱彼迎</td>\n",
       "      <td>2700</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>SpaceX</td>\n",
       "      <td>2500</td>\n",
       "      <td>洛杉矶</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>WeWork</td>\n",
       "      <td>2100</td>\n",
       "      <td>纽约</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Stripe</td>\n",
       "      <td>1600</td>\n",
       "      <td>旧金山</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽企业_估值前十名       企业名称 估值（亿人民币）   总部\n",
       "前十名                                 \n",
       "1                 蚂蚁金服    10000   杭州\n",
       "2                 字节跳动     5000   北京\n",
       "3                 滴滴出行     3600   北京\n",
       "4                Infor     3500   纽约\n",
       "5            JUUL Labs     3400  旧金山\n",
       "6                  陆金所     2700   上海\n",
       "6                  爱彼迎     2700  旧金山\n",
       "8               SpaceX     2500  洛杉矶\n",
       "9               WeWork     2100   纽约\n",
       "10              Stripe     1600  旧金山"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_label = \"独角兽企业_估值前十名\"\n",
    "d.columns.name = df_label\n",
    "display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>中国独角兽数量最多的行业.1</th>\n",
       "      <th>中国独角兽数量最多的行业.2</th>\n",
       "      <th>中国独角兽数量最多的行业.3</th>\n",
       "      <th>中国独角兽数量最多的行业.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>中国独角兽数量最多的行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>行业</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>总估值（十亿美元）</td>\n",
       "      <td>成为独角兽平均所花时间（年）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>33</td>\n",
       "      <td>62</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>22</td>\n",
       "      <td>262</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>物流</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             中国独角兽数量最多的行业.1 中国独角兽数量最多的行业.2 中国独角兽数量最多的行业.3  中国独角兽数量最多的行业.4\n",
       "中国独角兽数量最多的行业                                                             \n",
       "NaN                      行业          独角兽数量      总估值（十亿美元）  成为独角兽平均所花时间（年）\n",
       "1.0                    电子商务             33             62               5\n",
       "2.0                    金融科技             22            262               5\n",
       "3.0                   媒体和娱乐             17            123               6\n",
       "4.0                      物流             16             57               6"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 7\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽数_行业最多_中国"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_行业最多_中国</th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>总估值（十亿美元）</th>\n",
       "      <th>成为独角兽平均所花时间（年）</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>33</td>\n",
       "      <td>62</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>22</td>\n",
       "      <td>262</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>物流</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>15</td>\n",
       "      <td>30</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_行业最多_中国     行业 独角兽数量 总估值（十亿美元） 成为独角兽平均所花时间（年）\n",
       "排名                                                \n",
       "1              电子商务    33        62              5\n",
       "2              金融科技    22       262              5\n",
       "3             媒体和娱乐    17       123              6\n",
       "4                物流    16        57              6\n",
       "5              人工智能    15        30              4"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"排名\" \n",
    "d.index = d.index.astype(int)\n",
    "d.columns.name = \"独角兽数_行业最多_中国\" \n",
    "# 2019胡润全球独角兽活跃投资机构百强榜\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽数_行业最多_中国\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>美国独角兽数量最多的行业.1</th>\n",
       "      <th>美国独角兽数量最多的行业.2</th>\n",
       "      <th>美国独角兽数量最多的行业.3</th>\n",
       "      <th>美国独角兽数量最多的行业.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>美国独角兽数量最多的行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>行业</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>总估值（十亿美元）</td>\n",
       "      <td>成为独角兽平均所花时间（年）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>云计算</td>\n",
       "      <td>32</td>\n",
       "      <td>97</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>21</td>\n",
       "      <td>71</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>20</td>\n",
       "      <td>43</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>17</td>\n",
       "      <td>37</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             美国独角兽数量最多的行业.1 美国独角兽数量最多的行业.2 美国独角兽数量最多的行业.3  美国独角兽数量最多的行业.4\n",
       "美国独角兽数量最多的行业                                                             \n",
       "NaN                      行业          独角兽数量      总估值（十亿美元）  成为独角兽平均所花时间（年）\n",
       "1.0                     云计算             32             97               8\n",
       "2.0                    金融科技             21             71               6\n",
       "3.0                    人工智能             20             43               7\n",
       "4.0                    电子商务             17             37               6"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 6\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽数_行业最多_美国"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_行业最多_美国</th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>总估值（十亿美元）</th>\n",
       "      <th>成为独角兽平均所花时间（年）</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>云计算</td>\n",
       "      <td>32</td>\n",
       "      <td>97</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>21</td>\n",
       "      <td>71</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>20</td>\n",
       "      <td>43</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>17</td>\n",
       "      <td>37</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>健康科技</td>\n",
       "      <td>12</td>\n",
       "      <td>22</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_行业最多_美国    行业 独角兽数量 总估值（十亿美元） 成为独角兽平均所花时间（年）\n",
       "排名                                               \n",
       "1              云计算    32        97              8\n",
       "2             金融科技    21        71              6\n",
       "3             人工智能    20        43              7\n",
       "4             电子商务    17        37              6\n",
       "5             健康科技    12        22              7"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"排名\" \n",
    "d.index = d.index.astype(int)\n",
    "d.columns.name = \"独角兽数_行业最多_美国\" \n",
    "# 2019胡润全球独角兽活跃投资机构百强榜\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽数_行业最多_美国\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>中国独角兽数量最多的行业.1</th>\n",
       "      <th>中国独角兽数量最多的行业.2</th>\n",
       "      <th>中国独角兽数量最多的行业.3</th>\n",
       "      <th>中国独角兽数量最多的行业.4</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>中国独角兽数量最多的行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>NaN</th>\n",
       "      <td>行业</td>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>总估值（十亿美元）</td>\n",
       "      <td>成为独角兽平均所花时间（年）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>33</td>\n",
       "      <td>62</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>22</td>\n",
       "      <td>262</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.0</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.0</th>\n",
       "      <td>物流</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             中国独角兽数量最多的行业.1 中国独角兽数量最多的行业.2 中国独角兽数量最多的行业.3  中国独角兽数量最多的行业.4\n",
       "中国独角兽数量最多的行业                                                             \n",
       "NaN                      行业          独角兽数量      总估值（十亿美元）  成为独角兽平均所花时间（年）\n",
       "1.0                    电子商务             33             62               5\n",
       "2.0                    金融科技             22            262               5\n",
       "3.0                   媒体和娱乐             17            123               6\n",
       "4.0                      物流             16             57               6"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 7\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽数_行业最多_中国"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_行业最多_中国</th>\n",
       "      <th>行业</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>总估值（十亿美元）</th>\n",
       "      <th>成为独角兽平均所花时间（年）</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>电子商务</td>\n",
       "      <td>33</td>\n",
       "      <td>62</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>金融科技</td>\n",
       "      <td>22</td>\n",
       "      <td>262</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>物流</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>人工智能</td>\n",
       "      <td>15</td>\n",
       "      <td>30</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_行业最多_中国     行业 独角兽数量 总估值（十亿美元） 成为独角兽平均所花时间（年）\n",
       "排名                                                \n",
       "1              电子商务    33        62              5\n",
       "2              金融科技    22       262              5\n",
       "3             媒体和娱乐    17       123              6\n",
       "4                物流    16        57              6\n",
       "5              人工智能    15        30              4"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"排名\" \n",
    "d.index = d.index.astype(int)\n",
    "d.columns.name = \"独角兽数_行业最多_中国\" \n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽数_行业最多_中国\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>最快的独角兽.1</th>\n",
       "      <th>最快的独角兽.2</th>\n",
       "      <th>最快的独角兽.3</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>最快的独角兽</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>成为独角兽所花时间（年）</th>\n",
       "      <td>独角兽数量</td>\n",
       "      <td>估值最高的独角兽</td>\n",
       "      <td>估值（亿人民币）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>&lt;1</th>\n",
       "      <td>5</td>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>24</td>\n",
       "      <td>贝壳找房</td>\n",
       "      <td>600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>36</td>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>64</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             最快的独角兽.1   最快的独角兽.2  最快的独角兽.3\n",
       "最快的独角兽                                    \n",
       "成为独角兽所花时间（年）    独角兽数量   估值最高的独角兽  估值（亿人民币）\n",
       "<1                  5       蚂蚁金服     10000\n",
       "1                  24       贝壳找房       600\n",
       "2                  36       滴滴出行      3600\n",
       "3                  64  JUUL Labs      3400"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 8\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽数_最快"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_最快</th>\n",
       "      <th>独角兽数量</th>\n",
       "      <th>估值最高的独角兽</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>所花时间（年）</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>&lt;1</th>\n",
       "      <td>5</td>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>24</td>\n",
       "      <td>贝壳找房</td>\n",
       "      <td>600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>36</td>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>3600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>64</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>65</td>\n",
       "      <td>陆金所</td>\n",
       "      <td>2700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>67</td>\n",
       "      <td>DoorDash</td>\n",
       "      <td>900</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_最快 独角兽数量   估值最高的独角兽 估值（亿人民币）\n",
       "所花时间（年）                          \n",
       "<1          5       蚂蚁金服    10000\n",
       "1          24       贝壳找房      600\n",
       "2          36       滴滴出行     3600\n",
       "3          64  JUUL Labs     3400\n",
       "4          65        陆金所     2700\n",
       "5          67   DoorDash      900"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.columns = d.iloc[0] # 将第一行内容值作成栏位值\n",
    "d = d[1:] # 将第一行内容忽然不留\n",
    "d.index.name = \"所花时间（年）\" \n",
    "d.columns.name = \"独角兽数_最快\" \n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽数_最快\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>投资机构</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Sequoia（红杉资本）</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Tencent（腾讯）</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>SoftBank（软银）</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Tiger Fund（老虎基金）</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>IDG</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               投资机构 独角兽数量\n",
       "1     Sequoia（红杉资本）    92\n",
       "2       Tencent（腾讯）    46\n",
       "3      SoftBank（软银）    42\n",
       "4  Tiger Fund（老虎基金）    36\n",
       "5               IDG    31"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 9\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽数_投资机构"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽数_投资机构</th>\n",
       "      <th>投资机构</th>\n",
       "      <th>独角兽数量</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ranking</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Sequoia（红杉资本）</td>\n",
       "      <td>92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Tencent（腾讯）</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>SoftBank（软银）</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Tiger Fund（老虎基金）</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>IDG</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Top 100</th>\n",
       "      <td>Viking Global Investors</td>\n",
       "      <td>Top 100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Top 100</th>\n",
       "      <td>Visa</td>\n",
       "      <td>Top 100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Top 100</th>\n",
       "      <td>Volkswagen（大众汽车）</td>\n",
       "      <td>Top 100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Top 100</th>\n",
       "      <td>Xiaomi（小米）</td>\n",
       "      <td>Top 100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Top 100</th>\n",
       "      <td>YF Capital（云锋基金）</td>\n",
       "      <td>Top 100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>119 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽数_投资机构                     投资机构    独角兽数量\n",
       "ranking                                    \n",
       "1                    Sequoia（红杉资本）       92\n",
       "2                      Tencent（腾讯）       46\n",
       "3                     SoftBank（软银）       42\n",
       "4                 Tiger Fund（老虎基金）       36\n",
       "5                              IDG       31\n",
       "...                            ...      ...\n",
       "Top 100    Viking Global Investors  Top 100\n",
       "Top 100                       Visa  Top 100\n",
       "Top 100           Volkswagen（大众汽车）  Top 100\n",
       "Top 100                 Xiaomi（小米）  Top 100\n",
       "Top 100           YF Capital（云锋基金）  Top 100\n",
       "\n",
       "[119 rows x 2 columns]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.index.name = \"ranking\" \n",
    "d.columns.name = \"独角兽数_投资机构\" \n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽数_投资机构\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 表格11"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>企业名称</th>\n",
       "      <th>Company Name</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>国家</th>\n",
       "      <th>城市</th>\n",
       "      <th>行业</th>\n",
       "      <th>掌门人/创始人</th>\n",
       "      <th>成立年份</th>\n",
       "      <th>部分投资机构</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>Ant Financial</td>\n",
       "      <td>10000</td>\n",
       "      <td>中国</td>\n",
       "      <td>杭州</td>\n",
       "      <td>金融科技</td>\n",
       "      <td>井贤栋</td>\n",
       "      <td>2014</td>\n",
       "      <td>春华资本、中投海外、红杉资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>Bytedance</td>\n",
       "      <td>5000</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>张一鸣</td>\n",
       "      <td>2012</td>\n",
       "      <td>红杉资本、海纳亚洲、纪源资本、启明创投</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>Didi Chuxing</td>\n",
       "      <td>3600</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>共享经济</td>\n",
       "      <td>程维</td>\n",
       "      <td>2012</td>\n",
       "      <td>腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infor</td>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>美国</td>\n",
       "      <td>纽约</td>\n",
       "      <td>云计算</td>\n",
       "      <td>Jim Schaper</td>\n",
       "      <td>2002</td>\n",
       "      <td>Golden Gate Capital, Koch Equity Development</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "      <td>美国</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>消费品</td>\n",
       "      <td>Adam Bowen, James Monsees, Kevin Burns, Tim Da...</td>\n",
       "      <td>2015</td>\n",
       "      <td>M13, Timothy Davis, Evolution VC Partners, Tig...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         企业名称   Company Name  估值（亿人民币）  国家   城市     行业  \\\n",
       "排名                                                       \n",
       "1        蚂蚁金服  Ant Financial     10000  中国   杭州   金融科技   \n",
       "2        字节跳动      Bytedance      5000  中国   北京  媒体和娱乐   \n",
       "3        滴滴出行   Didi Chuxing      3600  中国   北京   共享经济   \n",
       "4       Infor          Infor      3500  美国   纽约    云计算   \n",
       "5   JUUL Labs      JUUL Labs      3400  美国  旧金山    消费品   \n",
       "\n",
       "                                              掌门人/创始人  成立年份  \\\n",
       "排名                                                            \n",
       "1                                                 井贤栋  2014   \n",
       "2                                                 张一鸣  2012   \n",
       "3                                                  程维  2012   \n",
       "4                                         Jim Schaper  2002   \n",
       "5   Adam Bowen, James Monsees, Kevin Burns, Tim Da...  2015   \n",
       "\n",
       "                                               部分投资机构  \n",
       "排名                                                     \n",
       "1                                      春华资本、中投海外、红杉资本  \n",
       "2                                 红杉资本、海纳亚洲、纪源资本、启明创投  \n",
       "3                              腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本  \n",
       "4        Golden Gate Capital, Koch Equity Development  \n",
       "5   M13, Timothy Davis, Evolution VC Partners, Tig...  "
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i = 10\n",
    "d = df_list[i].copy()\n",
    "d.head()\n",
    "#  独角兽"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>独角兽</th>\n",
       "      <th>企业名称</th>\n",
       "      <th>Company Name</th>\n",
       "      <th>估值（亿人民币）</th>\n",
       "      <th>国家</th>\n",
       "      <th>城市</th>\n",
       "      <th>行业</th>\n",
       "      <th>掌门人/创始人</th>\n",
       "      <th>成立年份</th>\n",
       "      <th>部分投资机构</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>排名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蚂蚁金服</td>\n",
       "      <td>Ant Financial</td>\n",
       "      <td>10000</td>\n",
       "      <td>中国</td>\n",
       "      <td>杭州</td>\n",
       "      <td>金融科技</td>\n",
       "      <td>井贤栋</td>\n",
       "      <td>2014</td>\n",
       "      <td>春华资本、中投海外、红杉资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>字节跳动</td>\n",
       "      <td>Bytedance</td>\n",
       "      <td>5000</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>媒体和娱乐</td>\n",
       "      <td>张一鸣</td>\n",
       "      <td>2012</td>\n",
       "      <td>红杉资本、海纳亚洲、纪源资本、启明创投</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>滴滴出行</td>\n",
       "      <td>Didi Chuxing</td>\n",
       "      <td>3600</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>共享经济</td>\n",
       "      <td>程维</td>\n",
       "      <td>2012</td>\n",
       "      <td>腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infor</td>\n",
       "      <td>Infor</td>\n",
       "      <td>3500</td>\n",
       "      <td>美国</td>\n",
       "      <td>纽约</td>\n",
       "      <td>云计算</td>\n",
       "      <td>Jim Schaper</td>\n",
       "      <td>2002</td>\n",
       "      <td>Golden Gate Capital, Koch Equity Development</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>JUUL Labs</td>\n",
       "      <td>3400</td>\n",
       "      <td>美国</td>\n",
       "      <td>旧金山</td>\n",
       "      <td>消费品</td>\n",
       "      <td>Adam Bowen, James Monsees, Kevin Burns, Tim Da...</td>\n",
       "      <td>2015</td>\n",
       "      <td>M13, Timothy Davis, Evolution VC Partners, Tig...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>Zeta Global</td>\n",
       "      <td>Zeta Global</td>\n",
       "      <td>70</td>\n",
       "      <td>美国</td>\n",
       "      <td>纽约</td>\n",
       "      <td>人工智能</td>\n",
       "      <td>David A. Steinberg, John Sculley</td>\n",
       "      <td>2007</td>\n",
       "      <td>GPI Capital, GSO Capital Partners</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>掌门1对1</td>\n",
       "      <td>Zhangmen</td>\n",
       "      <td>70</td>\n",
       "      <td>中国</td>\n",
       "      <td>上海</td>\n",
       "      <td>教育科技</td>\n",
       "      <td>张翼</td>\n",
       "      <td>2014</td>\n",
       "      <td>顺为资本、达晨创投、华平投资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>转转</td>\n",
       "      <td>Zhuanzhuan</td>\n",
       "      <td>70</td>\n",
       "      <td>中国</td>\n",
       "      <td>北京</td>\n",
       "      <td>电子商务</td>\n",
       "      <td>姚劲波</td>\n",
       "      <td>2015</td>\n",
       "      <td>腾讯</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>Zipline International</td>\n",
       "      <td>Zipline International</td>\n",
       "      <td>70</td>\n",
       "      <td>美国</td>\n",
       "      <td>半月湾</td>\n",
       "      <td>物流</td>\n",
       "      <td>Keenan Wyrobek, Keller Rinaudo, Will Hetzler</td>\n",
       "      <td>2014</td>\n",
       "      <td>Sequoia Capital, Visionnaire Ventures, Katalys...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>ZipRecruiter</td>\n",
       "      <td>ZipRecruiter</td>\n",
       "      <td>70</td>\n",
       "      <td>美国</td>\n",
       "      <td>洛杉矶</td>\n",
       "      <td>电子商务</td>\n",
       "      <td>Ian Siegel, Joe Edmonds, Ward Poulos, Willis Redd</td>\n",
       "      <td>2010</td>\n",
       "      <td>IVP (Institutional Venture Partners)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>494 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "独角兽                   企业名称           Company Name  估值（亿人民币）  国家   城市     行业  \\\n",
       "排名                                                                            \n",
       "1                     蚂蚁金服          Ant Financial     10000  中国   杭州   金融科技   \n",
       "2                     字节跳动              Bytedance      5000  中国   北京  媒体和娱乐   \n",
       "3                     滴滴出行           Didi Chuxing      3600  中国   北京   共享经济   \n",
       "4                    Infor                  Infor      3500  美国   纽约    云计算   \n",
       "5                JUUL Labs              JUUL Labs      3400  美国  旧金山    消费品   \n",
       "..                     ...                    ...       ...  ..  ...    ...   \n",
       "264            Zeta Global            Zeta Global        70  美国   纽约   人工智能   \n",
       "264                  掌门1对1               Zhangmen        70  中国   上海   教育科技   \n",
       "264                     转转             Zhuanzhuan        70  中国   北京   电子商务   \n",
       "264  Zipline International  Zipline International        70  美国  半月湾     物流   \n",
       "264           ZipRecruiter           ZipRecruiter        70  美国  洛杉矶   电子商务   \n",
       "\n",
       "独角兽                                            掌门人/创始人  成立年份  \\\n",
       "排名                                                             \n",
       "1                                                  井贤栋  2014   \n",
       "2                                                  张一鸣  2012   \n",
       "3                                                   程维  2012   \n",
       "4                                          Jim Schaper  2002   \n",
       "5    Adam Bowen, James Monsees, Kevin Burns, Tim Da...  2015   \n",
       "..                                                 ...   ...   \n",
       "264                   David A. Steinberg, John Sculley  2007   \n",
       "264                                                 张翼  2014   \n",
       "264                                                姚劲波  2015   \n",
       "264       Keenan Wyrobek, Keller Rinaudo, Will Hetzler  2014   \n",
       "264  Ian Siegel, Joe Edmonds, Ward Poulos, Willis Redd  2010   \n",
       "\n",
       "独角兽                                             部分投资机构  \n",
       "排名                                                      \n",
       "1                                       春华资本、中投海外、红杉资本  \n",
       "2                                  红杉资本、海纳亚洲、纪源资本、启明创投  \n",
       "3                               腾讯、阿里巴巴、红杉资本、经纬中国、纪源资本  \n",
       "4         Golden Gate Capital, Koch Equity Development  \n",
       "5    M13, Timothy Davis, Evolution VC Partners, Tig...  \n",
       "..                                                 ...  \n",
       "264                  GPI Capital, GSO Capital Partners  \n",
       "264                                     顺为资本、达晨创投、华平投资  \n",
       "264                                                 腾讯  \n",
       "264  Sequoia Capital, Visionnaire Ventures, Katalys...  \n",
       "264               IVP (Institutional Venture Partners)  \n",
       "\n",
       "[494 rows x 9 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "494\n"
     ]
    }
   ],
   "source": [
    "d.columns.name = \"独角兽\" \n",
    "display(d)\n",
    "print(len(d))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_label = \"独角兽\" \n",
    "d.columns.name = df_label\n",
    "# display(d)\n",
    "df_out[df_label] = d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 输出了 df_out"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "12\n",
      "['独角兽', '独角兽企业_从大公司分拆出来', '独角兽企业_估值前十名', '独角兽数_占比_国家', '独角兽数_占比_行业', '独角兽数_国家', '独角兽数_城市', '独角兽数_投资机构', '独角兽数_投资机构_前十名', '独角兽数_最快', '独角兽数_行业最多_中国', '独角兽数_行业最多_美国']\n"
     ]
    }
   ],
   "source": [
    "print (  len ( df_out.keys() ) )\n",
    "print ( sorted(list(df_out.keys())) )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 檔案文件清單 file manifest\n",
    "- 输入\n",
    "url -> pandas.read_html() ->\n",
    "- 输出\n",
    "data_sets/hurun_unicorn_{year}.xlsx"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "fn_out = \"data_sets/hurun_unicorn_{yr}.xlsx\"\n",
    "\n",
    "# 分頁\n",
    "writer = pd.ExcelWriter(fn_out.format(yr=2019))\n",
    "\n",
    "for p in sorted(list(df_out.keys())) :\n",
    "    df_out[p].to_excel(writer,\"{p}\".format(p=p))\n",
    "    \n",
    "writer.save()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---\n",
    "结束\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
